package lueder.classes;

import java.util.Date;

public class Order extends ShoppingCart {
	
	private int orderId;
	//private Customer customer;
	private String customerIp;
	private Date orderDate;
	private double shippingCharges;
	private boolean isCancelled;
	private boolean isPaid;
	private boolean isShipped;
	
	public Order() {
	}

	public Order(ShoppingCart cart, String customerIp) {
		super();
		this.articles = cart.articles;
		this.amounts = cart.amounts;
		//this.orderId = orderId;
		this.customerIp = customerIp;
		this.orderDate = new Date();
		//this.shippingCharges = shippingCharges;
		this.isCancelled = false;
		this.isPaid = false;
		this.isShipped = false;
	}

	@Override
	public String toString() {
		return "Order [orderId=" + orderId + ", customerIp=" + customerIp
				+ ", orderDate=" + orderDate + ", shippingCharges="
				+ shippingCharges + ", isCancelled=" + isCancelled
				+ ", isPaid=" + isPaid + ", isShipped=" + isShipped + "]";
	}
	
	@Override
	public String toHtml()
	{
		String html = super.toHtml()+this.toString();
		return html;
	}
	
	
	
}
